package com.wulian.service.impl;

import com.wulian.dao.RecordDao;
import com.wulian.entities.Record;
import com.wulian.service.RecordService;
import com.wulian.utils.IDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xf
 * @date 2021/3/21 下午 2:23
 * @Description
 */
@Service
public class RecordServiceImpl implements RecordService {

    @Autowired
    private RecordDao recordDao;


    @Override
    public List<Record> getAll() {
        List<Record> records = recordDao.getAll();
        return records;
    }

    @Override
    public List<Record> getAllByPage(Integer num, Integer size) {
        return recordDao.getAllByPage(num, size);
    }

    @Override
    public Record getRecordById(Long id) {
        return recordDao.getRecordById(id);
    }

    @Override
    public void addRecord(Record record) {
        recordDao.addRecord(record);
    }

    @Override
    public void updateRecord(Record record) {
        recordDao.updateRecord(record);
    }

    @Override
    public void deleteRecord(Long id) {
        recordDao.deleteRecord(id);
    }
}
